package controller;

import java.util.ArrayList;

import manager.SectionMgr;
import entity.Course;
import entity.Section;

/**
 * @author huiwensong.2012, huangjm.2012, sheryl.tay.2012, mohameds.2012
 * 
 */

public class SectionCtrl {

	private SectionMgr sectionMgr;

	public SectionCtrl() {
		sectionMgr = new SectionMgr();
	}

	public void addSection(Section section) {
		sectionMgr.addSection(section);
	}

	public ArrayList<Section> retrieveSectionsForCourseCode(String courseCode) {
		return sectionMgr.retrieveSectionsForCourse(courseCode);
	}

	public ArrayList<Section> retrieveSectionsForCourse(Course course) {
		return sectionMgr.retrieveSectionsForCourse(course.getCourseCode());
	}

	public Section retrieveSection(String courseCode, String sectionCode) {
		return sectionMgr.retrieveSectionForCourseCodeAndSectionCode(
				courseCode, sectionCode);
	}

}
